import { Module, ValidationPipe } from '@nestjs/common';
import { APP_PIPE } from '@nestjs/core';
import { TypeOrmModule } from '@nestjs/typeorm';
import { CommentModule } from 'lib/comment';
import { Migrate } from 'libs/db/entity/migrate.entity';
import { MigrateController } from './migrate.controller';
import { MigrateService } from './migrate.service';

@Module({
    imports: [
        CommentModule,
        TypeOrmModule.forFeature([Migrate])
    ],
    controllers: [
        MigrateController
    ],
    providers: [
        MigrateService,
        {
            provide: APP_PIPE,
            useClass: ValidationPipe
        }
    ],
})
export class MigrateModule { }
